package com.zhanghe.study.design_pattern.decorator_pattern;

/**
 * @author zh
 * @date 2022/10/21 10:26
 */
public class ConcreteDecoratorB extends Decorator{

    public ConcreteDecoratorB(Component component) {
        super(component);
    }

    @Override
    public void operation() {
        super.operation();
        addBehavior();
    }

    // 添加的职责
    private void addBehavior(){
        System.out.println("B");
    }
}
